<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
<div style="width: 900px;height: 200px;">
    <form action="topimg.php" method="post" enctype="multipart/form-data">
        <input type="file" name="file" id="file" multiple="multiple" onchange="newimg();" value="" /><br/>
        <img src="" id="imgurl" alt="请选择你的头像" >
        <button type="submit" >提交</button>
    </form>
</div>
<form action="selfinfo.php" method="post">
    姓名:<input type="text" name="username" id="" value="" /><br>
    特长:<input type="text" name="username" id="" value="" /><br>
    性别:<input type="radio" name="sex" id="" value="" />男&nbsp;&nbsp;&nbsp;
    <input type="radio" name="sex" id="" value="" />女<br>
    公司:<input type="text" name="gongs" id="" value="" /><br>
    职务:<input type="text" name="zy" id="" value="" /><br>
    微信:<input type="text" name="QQ" id="" value="" /><br>
    QQ:<input type="text" name="wx" id="" value="" /><br>
    所在地: <select name="dz">
        <option value="请选择省"></option>
    </select>&nbsp;&nbsp;&nbsp;
    <select name="si">
        <option value="请选择市"></option>
    </select><br>
    自我介绍:<textarea rows="5" cols="40" name="self">

					</textarea>
    <button>提交</button>
</form>
</body>
<script type="text/javascript">
    function newimg(){
        var arr=document.getElementById('file');
        var files = arr['files'];

        //
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        console.log(imgURL);
        //
        document.getElementById('imgurl').src = imgURL;
    }
</script>
</html>


<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/2
 * Time: 10:25
 */



?>
